#pragma once

#include <SFML/Network.hpp>
#include <iostream>

namespace U2L
{
	class AsyncListener : private sf::Thread
	{
	public:
		AsyncListener(void);
		~AsyncListener(void);

		void Accept(sf::SocketTCP* _serverSocket, sf::SocketTCP* _clientSocket);
		bool IsListening(void) const;
		bool IsDone(void);
	private:
		virtual void Run(void);

		bool m_listening;
		bool m_done;
		sf::SocketTCP* m_serverSocket;
		sf::SocketTCP* m_clientSocket;
	};
}